﻿using System;
using System.Web.UI.WebControls;
using umbraco;
using umbraco.cms.businesslogic.datatype;
using umbraco.interfaces;
using umbraco.editorControls;

namespace Auros.Categorisation.Umbraco
{
    public class CategoryPickerPreValueEditor : PreValueEditorBase
    {
        public CategoryPickerPreValueEditor(umbraco.cms.businesslogic.datatype.BaseDataType dataType)
            : base(dataType)
        {

        }

        public override System.Web.UI.Control Editor
        {
            get { return this; }
        }

        protected override void RenderPreValueProperties(System.Web.UI.HtmlTextWriter writer)
        {
            writer.AddAttribute(System.Web.UI.HtmlTextWriterAttribute.Class, "dashboardWrapper");
            writer.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.Div);
            
            writer.RenderBeginTag(System.Web.UI.HtmlTextWriterTag.P);

            writer.Write("There is no configuration needed for this data type.");

            writer.RenderEndTag();
            writer.RenderEndTag();
        }

        public override void Save()
        {
            throw new NotImplementedException();
        }
    }
}